package constructor.composite;

import java.util.ArrayList;
import java.util.List;

public class College extends Origanization {

    // 学院
    private List<Origanization> origanizationList = new ArrayList<>();

    public College(String name, String desc) {
        super(name, desc);
    }

    @Override
    public void add(Origanization origanization) {
        origanizationList.add(origanization);
    }

    @Override
    public void print() {
        System.out.println("======" + name + "=======" + desc);
        for (Origanization origanization : origanizationList) {
            origanization.print();
        }
    }
}